Skip to content

fix: deselecting group chip reselects All teams#543

Open
piyush140104 wants to merge 1 commit intodevsecopsmaturitymodel:mainfrom
piyush140104:fix/team-group-chip-deselect
Open

fix: deselecting group chip reselects All teams#543
piyush140104 wants to merge 1 commit intodevsecopsmaturitymodel:mainfrom
piyush140104:fix/team-group-chip-deselect

Conversation

@piyush140104
Copy link
Copy Markdown

@piyush140104 piyush140104 commented Apr 7, 2026

Problem

On the heatmap page, once a team group chip (e.g. Customer, Internal) is selected there is no way to deselect it. Clicking it again does nothing and the chip stays permanently stuck in the selected state.

Root Cause

In toggleTeamGroupFilter() inside circular-heatmap.component.ts, the else branch which runs when the chip is already selected only had a console.log and returned immediately. There was no deselection logic.

Fix
Replaced chip.toggleSelected() calls with data driven logic using filtersTeamGroups as the single source of truth since the template already binds [selected] to filtersTeamGroups[group.key]. Selecting a group chip now deselects all other group chips first. Deselecting a group chip clears all team filters, resets hasTeamsFilter and automatically reselects the All teams chip. setVisibleTeams() is now called once after the loop instead of inside it.

Reviewers
@vbakke @wurstbrot

Closes #524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TeamGroup filter chip cannot be deselected once selected

1 participant